package com.crm.api.mapper;

import com.crm.api.entity.WorkOrderHistory;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 工单历史数据访问接口
 */
@Mapper
public interface WorkOrderHistoryMapper {

    /**
     * 插入工单历史记录
     */
    void insert(WorkOrderHistory history);

    /**
     * 根据工单ID查询操作历史
     */
    List<Map<String, Object>> findByWorkOrderId(Integer workOrderId);

    /**
     * 根据工单ID和操作类型查询历史
     */
    List<Map<String, Object>> findByWorkOrderIdAndType(Integer workOrderId, String operationType);
}